/// <summary>
        /// Gets the title from the html code.
        /// </summary>
        /// <param name="html"></param>
        /// <returns></returns>
        private static string GetTitle(string html)
        {
            Regex r = new Regex("<title.*?>");
            int Title_start = 0;
            int Title_end = 0;
            foreach (Match m in r.Matches(html))
            {
                if (m.Value == "<title>")
                {
                    Title_start = m.Index + m.Length;
                    break;
                }
            }
            r = new Regex("</title.*?>");
            foreach (Match m in r.Matches(html))
            {
                if (m.Value == "</title>")
                {
                    Title_end = m.Index - Title_start;
                    break;
                }
            }
            string title = html.Substring(Title_start, Title_end);
            return title;
        }